this._swipeTracker.connect('end', this._switchWorkspaceEnd.bind(this));
this.connect('notify::mapped', this._updateSwipeTracker.bind(this));
+ this._layoutRowsNotifyId = workspaceManager.connect(
+ 'notify::layout-rows', this._updateTrackerOrientation.bind(this));
+ this._updateTrackerOrientation();
+
this._windowDragBeginId =
Main.overview.connect('window-drag-begin',
this._windowDragBegin.bind(this));
global.window_manager.disconnect(this._switchWorkspaceId);
global.workspace_manager.disconnect(this._reorderWorkspacesdId);
+ global.workspace_manager.disconnect(this._layoutRowsNotifyId);
Main.overview.disconnect(this._windowDragBeginId);
Main.overview.disconnect(this._windowDragEndId);
}
});
}
+ _updateTrackerOrientation() {
+ const { layoutRows } = global.workspace_manager;
+ this._swipeTracker.orientation = layoutRows !== -1
+ ? Clutter.Orientation.HORIZONTAL
+ : Clutter.Orientation.VERTICAL;
+ }
+
_directionForProgress(progress) {
if (global.workspace_manager.layout_rows === -1) {
return progress > 0
if (this._gestureActive)
adjustment.remove_transition('value');
- tracker.orientation = workspaceManager.layout_rows !== -1
- ? Clutter.Orientation.HORIZONTAL
- : Clutter.Orientation.VERTICAL;
-
const distance = global.workspace_manager.layout_rows === -1
? this.height : this.width;